home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / grabtext.arc / SDNLOGON.C < prev    next >
Text File  |  1990-08-28  |  7KB  |  179 lines

  1. /* sdnlogon.c by bill buckels 1990 */
  2.  
  3. unsigned char SDNLOGON[]={
  4. 255, 32,244, 32,202,205,251, 32,222,205,235, 32,236,205,221, 32,193,222,
  5. 196,223,193,205,193,219,194,223,193,221,193,205,193,219,193,221,194,205,
  6. 193,221,203,205,193,221,194,205,193,219,193,221,195,205,193,221,211,205,
  7. 195, 32,193,221,213, 32,193,219,196,220,193,205,193,219,194,205,193,219,
  8. 193,205,193,221,193,205,193,220,193,205,193,221,193,205,193,222,193,223,
  9. 193,205,193,223,193,219,193,223,195,205,193,221,195,205,193,219,193,221,
  10. 195,205,193,219,193,205,193,219,194,223,193,221,193,205,193,219,194,223,
  11. 193,221,193,205,193,219,193,205,193,219,193,221,193,205,193,222,195,223,
  12. 194,205,193,221,194, 32, 40,115,109, 41,206, 32,195,205,195,219,193,205,
  13. 193,219,193,221,193,205,193,219,193,205,193,219,193,221,193,205,193,219,
  14. 193,221,193,205,193,222,193,223,194,205,193,219,193,221,194,205,193,221,
  15. 196,205,193,222,193,221,193,205,193,221,193,205,193,219,193,205,193,219,
  16. 193,221,193,205,193,221,193,205,193,219,193,221,193,219,193,221,193,205,
  17. 193,219,193,220,193,223,194,205,194,223,194,219,194,205,193,221,193,205,
  18. 210, 32,194,205,193,219,193,220,195,219,193,205,194,219,193,220,193,221,
  19. 193,205,193,219,193,221,193,205,193,219,193,221,193,205,194,219,193,221,
  20. 193,205,193,219,193,221,193,205,193,221,198,205,194,219,193,205,193,219,
  21. 193,221,193,205,194,219,193,220,193,221,193,205,193,219,193,205,193,222,
  22. 193,220,193,205,193,219,193,205,193,219,193,221,193,205,193,219,193,220,
  23. 194,219,194,205,193,220,194,205,208, 32,255,205,194,205,207, 32,255,205,
  24. 194,205,206, 32,194,223,193,219,194,223,204,205,193,222,196,223,193,205,
  25. 193,219,194,223,193,221,193,205,193,219,193,221,194,205,193,221,194,205,
  26. 193,222,193,219,193,223,193,219,218,205,209, 32,194,219,194,205,193,219,
  27. 196,205,193,222,193,223,196,205,193,219,196,220,193,205,193,219,194,205,
  28. 193,219,193,205,193,219,193,205,193,220,193,205,193,221,195,205,193,219,
  29. 193,205,193,219,193,221,193,219,194,223,193,221,193,205,193,219,194,223,
  30. 193,221,193,205,194,223,193,219,193,223,193,205,193,222,193,223,194,205,
  31. 193,219,193,223,193,219,193,205,193,223,193,219,193,223,208, 32,194,219,
  32.  32,193,205,193,219,193,223,193,219,193,221,193,205,193,222,193,223,
  33. 198,205,195,219,193,205,193,219,193,221,193,205,193,219,193,205,193,219,
  34. 193,221,193,205,193,219,193,221,195,205,193,219,194,223,193,205,193,219,
  35. 193,221,193,219,193,221,193,205,193,219,193,221,193,205,193,221,195,205,
  36. 193,219,193,221,193,205,193,222,193,223,194,205,193,219,194,205,194, 32,
  37. 193,219,193,221,208, 32,194,219,194, 32,193,219,193,205,193,219,193,221,
  38. 193,205,194,219,193,221,195,205,193,219,193,220,195,219,193,205,194,219,
  39. 193,220,193,221,193,205,193,219,193,221,193,205,193,219,193,221,194,205,
  40. 193,222,193,219,193,221,194,205,193,219,193,205,193,222,193,220,193,205,
  41. 194,219,193,220,193,221,193,205,193,222,193,220,193,219,193,221,193,205,
  42. 194,219,193,221,193,205,193,219,193,220,193,219,193,221, 32,193,219,
  43. 193,221,217, 32,236,220,214, 32,193,218,255,205,200,205,191,199, 32,
  44. 179,197, 32, 73,110,116,101,114,110, 97,116,105,111,110, 97,108, 32,
  45.  83, 68, 78,101,116, 47, 87,111,114,107,115, 33, 32, 80,114,111,106,
  46. 101, 99,116, 32, 77, 97,110, 97,103,101,114, 32, 97,116, 32, 83, 68,
  47.  78, 32, 80,114,111,106,101, 99,116, 32,194, 66, 83,197, 32,179,199, 32,
  48. 179,197, 32, 83, 68, 78,101,119,115, 33, 32, 97,110,100, 32, 83, 68,
  49.  78,101,116, 47, 87,111,114,107,115, 33,195, 32, 84,104,101, 32, 83,
  50. 104, 97,114,101,119, 97,114,101, 32, 68,105,115,116,114,105, 98,117,
  51. 116,105,111,110, 32, 78,101,116,119,111,114,107,197, 32,179,199, 32,
  52. 193,192,255,205,200,205,193,217,211, 32, 49, 50,194, 48, 47, 50, 52,
  53. 194, 48, 47, 57, 54,194, 48, 32, 72, 83, 84, 32, 45, 32, 50, 52, 32,
  54.  72,111,117,114,115, 32, 45, 32, 83,121,115, 79,112, 32, 82, 97,121,
  55.  32, 75, 97,108,105,194,115,255, 32,255, 32,255, 32,255, 32,255, 32,
  56. 255, 32,231, 32,255,  7,209,  7,237, 15,227,  3,246, 15,218,  3,253, 15,
  57. 211,  3,255, 15,198, 15,203,  3,255, 15,204, 15,197,  3,255, 15,199, 15,
  58. 202,  3,255, 15,200, 15,201,  3,255, 15,201, 15,200,  3,255, 15,201, 15,
  59. 200,  3,255, 15,200, 15,201,  3,255,  7,201,  7,200,  3,255,  7,201,  7,
  60. 200,  3,255,  7,201,  7,200,  3,253,  1,211,  3,195,  1,255,127,202,127,
  61. 196,  3,195, 15,255,127,202,127,196,  3,195, 15,255,127,202,127,196,  3,
  62. 195, 15,255,127,202,127,206,  3,245, 11,255,  3,226,  3,215, 15, 11,
  63. 255,  3,255,  3,202,  3,255,  0,255,  0,226,  0,
  64. 0}; /* terminator */
  65.  
  66.  
  67. struct regs{
  68.     int AX;
  69.     int BX;
  70.     int CX;
  71.     int DX;
  72.     int SI;
  73.     int DI;
  74.     int DS;
  75.     int ES;
  76. }inregs,outregs;
  77.  
  78.  
  79. #define SCREENSIZE 4000
  80. unsigned int SCREENSEG= 0xb000;
  81.  
  82. /* this macro converts a base and offset to a far pointer */
  83. #define MK_FP(seg,off) ((char far *)(((long)(seg) << 16) | (off)))
  84.  
  85. #define TERMINATOR 1
  86.  
  87. void showpic(int argc, unsigned char *argv,unsigned char attr)
  88. {
  89.  
  90.     unsigned int byteoff=0,secondoff=1,packet;
  91.     unsigned char byte,bytecount;
  92.     int wordcount,target;
  93.     static char far *crt;
  94.  
  95.     target = argc-TERMINATOR;
  96.     crt = MK_FP(SCREENSEG,0x0000);
  97.  
  98.     wordcount=0;
  99.     do{ bytecount=1;                          /* start with a seed count */
  100.         byte=argv[wordcount];
  101.         wordcount++;
  102.                                               /* check to see if its raw */
  103.         if(0xC0 == (0xC0 &byte)){             /* if its not, run encoded */
  104.                     bytecount= 0x3f &byte;
  105.                     byte=argv[wordcount];
  106.                     wordcount++;
  107.                     }
  108.         for(packet=0;packet<bytecount;packet++){
  109.                    if(byteoff<SCREENSIZE){
  110.                         if(attr==0)crt[byteoff]=byte;
  111.                         byteoff+=2;
  112.                         }
  113.                    else{
  114.                         if(attr==0)crt[secondoff]=byte;
  115.                         else crt[secondoff]=attr;
  116.                         secondoff+=2;
  117.                         }
  118.                     }
  119.                      
  120.         }while(wordcount<target);
  121. }
  122.  
  123. main()
  124. {
  125.     unsigned char attr=0;
  126.     sysint(0x11,&inregs,&outregs); /* get equipment list from the bios */
  127.     /* get display type (bits 4 and 5 of ax) */
  128.     if ((outregs.AX & 0x30) < 0x30)SCREENSEG=0xb800;
  129.  
  130.                /* clearscreen and turn cursor off */
  131.                #asm
  132.                  mov ah,6
  133.                  mov al,0
  134.                  mov cx,0
  135.                  mov dh,24
  136.                  mov dl,79
  137.                  mov bh,0eh
  138.                  int 10h
  139.                  xor ax,ax
  140.                  mov ah,1
  141.                  mov cx,2000h
  142.                  int 10h
  143.                #endasm
  144.  
  145.         /* display the picture */
  146.  
  147.         showpic(sizeof(SDNLOGON),SDNLOGON,attr);
  148.         attr=255;
  149.  
  150.         do{ attr--;
  151.             showpic(sizeof(SDNLOGON),SDNLOGON,attr);
  152.             }
  153.             while(attr>0);
  154.  
  155.         /* wait for a keypress, clear the screen, and restore cursor */
  156.         #asm
  157.             xor ax,ax
  158.             xor dx,dx
  159.             int 16h
  160.             mov ah,6
  161.             mov al,0
  162.             mov cx,0
  163.             mov dh,24
  164.             mov dl,79
  165.             mov bh,0eh
  166.             int 10h
  167.             xor ax,ax
  168.             mov ah,1
  169.             mov cx,0607h
  170.             int 10h
  171.        #endasm
  172.        exit(0);
  173.  
  174.  
  175. }
  176.  
  177.  
  178.  
  179.